{extend name="common/main"}

{block name="css"}
<style>
    .lai{
        float: none;
        display:inline-block;
    }
</style>
{/block}

{block name="body"}
<body data-type="widgets">
{include file="common/index"}
<!-- 内容区域 -->
<div class="tpl-content-wrapper">
    <div class="row-content am-cf">
        <!--客户-->
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <!--<h3 class="widget-title  am-cf">用户信息</h3>-->
                <div class="widget am-cf">

                    <div class="widget-head am-cf">
                        <div class="widget-title  am-cf">用户信息</div>
                    </div>
                    <div class="widget-body am-fr">

                        <form class="am-form tpl-form-border-form tpl-form-border-br "  form="submit" id="form">

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-2">设备号(IMEI):</label>
                                <div class="am-u-sm-3 lai" >
                                    <input type="text"   disabled="true" id="Devid" name="Devid" value="{$data.Devid}">
                                    <input type="hidden" name="id" value="{$data.id}">
                                </div>
                            </div>

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">出厂时间:</label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<input type="text" disabled="true"  value="2017-04-27" >-->
                                <!--</div>-->
                            <!--</div>-->

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">型号: </label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<input type="text"   disabled="true" id="user-weibo" value="A9">-->
                                <!--</div>-->
                            <!--</div>-->

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-2">到期时间:</label>
                                <div class="am-u-sm-3 lai" >
                                    <input type="text" disabled="true" id="due_time" name="due_time" value="2118-04-05" >
                                </div>
                            </div>

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">用户到期:</label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<input type="text"  disabled="true" value="2052-04-29">-->
                                <!--</div>-->
                            <!--</div>-->

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-2">设备名称:</label>
                                <div class="am-u-sm-3 lai" >
                                    <input type="text" id="de_name" name="de_name" value="{$data.de_name}">
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-2">设备电话:</label>
                                <div class="am-u-sm-3 lai" >
                                    <input type="text" id="de_phone" name="de_phone"  value="{$data.de_phone}" >
                                </div>
                            </div>

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">IMEI登录名:</label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<input type="text"  >-->
                                <!--</div>-->
                            <!--</div>-->

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">过滤LBS:	 </label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<label> <input type="checkbox" class="tpl-form-input" value="1" name="state" ></label>-->
                                <!--</div>-->
                            <!--</div>-->

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-2">联系电话:	</label>
                                <div class="am-u-sm-3 lai" >
                                    <input type="text" id="lx_phone" name="lx_phone" value="{$data.lx_phone}">
                                </div>
                            </div>

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">更换图标: </label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="1" name="state"><img src="assets/img/27.gif"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="2" name="state"><img src="assets/img/2.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="3" name="state"><img src="assets/img/21.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="4" name="state" ><img src="assets/img/22.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="5" name="state"><img src="assets/img/23.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="6" name="state"><img src="assets/img/24.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="5" name="state"><img src="assets/img/25.png"></label>-->
                                    <!--<label> <input type="radio" class="tpl-form-input" value="6" name="state"><img src="assets/img/26.gif"></label>-->
                                <!--</div>-->
                            <!--</div>-->

                            <!--<div class="am-form-group">-->
                                <!--<label for="user-weibo" class="am-u-sm-2">备注:</label>-->
                                <!--<div class="am-u-sm-3 lai" >-->
                                    <!--<textarea style="height: 50px;width:400px;"></textarea>-->
                                <!--</div>-->
                            <!--</div>-->
                            <button type="button" class="am-btn am-btn-primary am-radius ad" onclick="roleSubmit()">确定</button>
                            <a href="{:url('User/menu')}" data-toggle="tooltip" title="" class="am-btn am-btn-primary am-radius">返回</a>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
</body>
{/block}
{block name="js"}
<script>
    //提交
    function roleSubmit() {
        var form = document.getElementById("form");
        var formData = new FormData(form);
        $.ajax({
            url: "{:Url('User/kehu')}",
            type: 'POST',
            data: formData,
            async: false,
            cache: false,
            contentType: false, //不设置内容类型
            processData: false, //不处理数据
            success: function (res) {
                if (res.code != 200) {
                    layer.msg(res.msg, {shade: 0.5, time: 1000, icon: 2});
                    return false;
                }
                layer.msg(res.msg, {shade: 0.5, time: 800, icon: 1}, function () {
                    window.location.href=document.referrer;//返回上一个界面刷新
                });
            }
        });
    }
</script>
{/block}